package com.cloudy.s3.request;

import java.util.Map;

import com.cloudy.exception.AWSAccessException;
import com.cloudy.impl.SuccessHandlerWithNoResponse;
import com.cloudy.s3.response.MetadataEntry;

public class HeadObject extends S3Request {

	public HeadObject(String bucketName, String objectName) {
		super(bucketName, "HEAD");
		super.setSuccessHandler(new SuccessHandlerWithNoResponse());
		super.resource = objectName;

	}

	public Map<String, MetadataEntry> execute() throws AWSAccessException {
		return executeInner().getMetadataEntries();
	}
	
}
